package com.libaoxuan.blog.utils;

import com.libaoxuan.blog.dao.pojo.SysUser;

public class UserThreadLocal {

    public UserThreadLocal(){};
    //线程变量隔离
    public static ThreadLocal<SysUser> LOCAL = new ThreadLocal<>();

    public static void put(SysUser sysUser) {
        LOCAL.set(sysUser);
    }

    public static SysUser get(){
        return LOCAL.get();
    }

    public static void remove() {
        LOCAL.remove();
    }
}
